<template>
  <div>
    <input ref="inputEl" placeholder="Focus on me!" />
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'

const inputEl = ref(null)

onMounted(() => {
  inputEl.value.focus()
})
</script>
